package ${package}.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import lombok.RequiredArgsConstructor;
import org.springframework.stereotype.Service;
import yyy.ab.common.core.BaseServiceImpl;
import yyy.ab.common.core.Query;
import yyy.ab.common.utils.StringUtils;
import ${package}.entity.${className};
import ${package}.mapper.${className}Mapper;
import ${package}.service.${className}Service;

/**
* @author ${author}
* @date ${date}
*/
@Service
@RequiredArgsConstructor
public class ${className}ServiceImpl extends BaseServiceImpl<${className}Mapper, ${className}> implements ${className}Service {

    @Override
    public IPage<${className}> findPage(Map<String, Object> params) {
        Object keyword = params.get("keyword");

        Page<${className}> page = new Query<${className}>(params).getPage();
        return baseMapper.selectPage(page, new QueryWrapper<${className}>().like(!StringUtils.isNullOrEmpty(keyword), "name", keyword));
    }
}